import 'package:xinxuan/vo/common_vo/common_pagination_vo.dart';

class SeckillRecoveryVo {

  List<SeckillRecoveryItem>? data;
  SeckillRecoveryMeta? meta;

  SeckillRecoveryVo({this.data, this.meta});

  SeckillRecoveryVo.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = [];
      json['data'].forEach((v) {
        data!.add(new SeckillRecoveryItem.fromJson(v));
      });
    }
    meta = json['meta'] != null ? new SeckillRecoveryMeta.fromJson(json['meta']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    if (this.meta != null) {
      data['meta'] = this.meta!.toJson();
    }
    return data;
  }
}

class SeckillRecoveryItem {
  int? id;
  int? teamId;
  int? userId;
  int? productId;
  String? title;
  String? image;
  String? price;
  int? status;
  String? statusStr;
  Payment? payment;

  SeckillRecoveryItem(
      {this.id,
      this.teamId,
      this.userId,
      this.productId,
      this.title,
      this.image,
      this.price,
      this.status,
      this.statusStr});

  SeckillRecoveryItem.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    teamId = json['team_id'];
    userId = json['user_id'];
    productId = json['product_id'];
    title = json['title'];
    image = json['image'];
    price = json['price'];
    status = json['status'];
    statusStr = json['status_str'];
    payment = json['payment'] != null ? new Payment.fromJson(json['payment']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['team_id'] = this.teamId;
    data['user_id'] = this.userId;
    data['product_id'] = this.productId;
    data['title'] = this.title;
    data['image'] = this.image;
    data['price'] = this.price;
    data['status'] = this.status;
    data['status_str'] = this.statusStr;
    if (this.payment != null) {
      data['payment'] = this.payment!.toJson();
    }
    return data;
  }
}

class Payment {
  String? accountName;
  String? cardNumber;
  int? bankId;
  String? bank;
  String? subbranch;
  String? mobile;

  Payment(
      {this.accountName,
      this.cardNumber,
      this.bankId,
      this.bank,
      this.subbranch,
      this.mobile});

  Payment.fromJson(Map<String, dynamic> json) {
    accountName = json['account_name'];
    cardNumber = json['card_number'];
    bankId = json['bank_id'];
    bank = json['bank'];
    subbranch = json['subbranch'];
    mobile = json['mobile'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['account_name'] = this.accountName;
    data['card_number'] = this.cardNumber;
    data['bank_id'] = this.bankId;
    data['bank'] = this.bank;
    data['subbranch'] = this.subbranch;
    data['mobile'] = this.mobile;
    return data;
  }
}

class SeckillRecoveryMeta {
  int? isRecovery;
  CommonPagination? pagination;

  SeckillRecoveryMeta({this.isRecovery, this.pagination});

  SeckillRecoveryMeta.fromJson(Map<String, dynamic> json) {
    isRecovery = json['is_recovery'];
    pagination = json['pagination'] != null
        ? new CommonPagination.fromJson(json['pagination'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['is_recovery'] = this.isRecovery;
    if (this.pagination != null) {
      data['pagination'] = this.pagination!.toJson();
    }
    return data;
  }
}